import { defineStore } from "pinia";
import { ref, computed } from "vue";

export const useGlobalStore = defineStore('global', () => {
  const theme = ref('light')
  const curTabbarIndex = ref(0)

  return {
    theme,
    curTabbarIndex
  }
}, {
  unistorage: {
    paths: ['theme', 'curTabbarIndex'], // 选择性持久化
  },
})